package com.wh.hotel.enums.strategy;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 策略适用范围表
 *
 * @author luweije
 */

@Getter
@AllArgsConstructor
public enum SuitTypeEnum {

    HOTEL_ROOM(1, "酒店-房型纬度"),
    ;

    private final int code;
    private final String desc;

    public static SuitTypeEnum parse(Integer code) {
        if (code == null) {
            return null;
        }
        for (SuitTypeEnum suitTypeEnum : SuitTypeEnum.values()) {
            if (suitTypeEnum.getCode() == code) {
                return suitTypeEnum;
            }
        }
        return null;
    }
}
